package com.example.hktest1;

import android.os.Bundle;
import android.widget.EditText;

import androidx.appcompat.app.AppCompatActivity;

import com.example.hktest1.databinding.ActivityMainBinding;

public class MainActivity extends AppCompatActivity {

    // Used to load the 'hktest1' library on application startup.
    static {
        System.loadLibrary("hktest1");
    }

    private ActivityMainBinding binding;
    private EditText logTextEV;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        binding = ActivityMainBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());

        // Example of a call to a native method
        logTextEV = binding.logText;
//        logTextEV.setFocusable(false);
//        logTextEV.setMovementMethod(ScrollingMovementMethod.getInstance());
        logTextEV.setText("666666");
        logTextEV.append(stringFromJNI()+"\n");
        for (int i=0;i<100;i++){
            logTextEV.getText().insert(0,i+"\n");
        }
    }

    /**
     * A native method that is implemented by the 'hktest1' native library,
     * which is packaged with this application.
     */
    public native String stringFromJNI();
}